$(document).ready(function(){

    $("#addtotal").click(function(){
        $.ajax({
            'url':'http://192.168.1.106/index.php/home/upload/add',
            'type':'post',
            data:{
                'eid':$("#eid").val(),
                'count':$("#count").val(),
                'date':$("#date").val(),
                'greater1':$("#greater1").val(),
                'greater3':$("#greater3").val(),
            },
            success:function(data){
                var obj = $.parseJSON(data);
                if(obj.status){
                    alert(obj.msg);
                    window.location.href='/index.php/Home/upload/'
                }else{
                    alert(obj.msg);
                    window.location.href='/index.php/Home/upload/'
                }
            }


        });
    });
    $("#addother").click(function(){
        $.ajax({
            'url':'http://192.168.1.106/index.php/home/upload/addother',
            'type':'post',
            data:{
                'eid':$("#eid").val(),
                'date':$("#date1").val(),
                'yuefang':$("#yuefang").val(),
                'yixiang':$("#yixiang").val(),
                'qianyue':$("#qianyue").val(),
            },
            success:function(data){
                var obj = $.parseJSON(data);
                console.log(obj);
                if(obj.status){
                    alert(obj.msg);
                    window.location.href='/index.php/Home/upload/'
                }else{
                    alert(obj.msg);
                    console.log(obj);
                }
            }
        });
});
});
